123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407 |
- import {
- C,
- _,
- l as l3,
- p,
- y as y4
- } from "./chunk-3FNKD2EB.js";
- import {
- j
- } from "./chunk-ZOO4I2U4.js";
- import {
- S2 as S,
- m,
- y as y3
- } from "./chunk-3Z755LKF.js";
- import {
- u as u2
- } from "./chunk-SKKBVHTF.js";
- import {
- i as i2
- } from "./chunk-JOYXMSKE.js";
- import {
- a,
- c,
- i
- } from "./chunk-PJNBFKPF.js";
- import {
- S as S2,
- w
- } from "./chunk-CRGY2SDS.js";
- import {
- o
- } from "./chunk-UVVU4UUO.js";
- import {
- l as l2
- } from "./chunk-X4SA4ELJ.js";
- import {
- r as r3
- } from "./chunk-5N7JLUJJ.js";
- import {
- s as s3
- } from "./chunk-YEJL5NEF.js";
- import {
- r as r2
- } from "./chunk-PQFTYGF5.js";
- import {
- e,
- e2,
- l3 as l,
- n5 as n,
- s5 as s2,
- t5 as t2,
- v,
- y3 as y2
- } from "./chunk-2Z2TG5CU.js";
- import {
- T,
- u
- } from "./chunk-SQOPWYIT.js";
- import {
- t2 as t
- } from "./chunk-V6P2MAQQ.js";
- import {
- s2 as s
- } from "./chunk-E5O6P5I2.js";
- import {
- y
- } from "./chunk-SPWQ3AWG.js";
- import {
- r
- } from "./chunk-YXWMMD76.js";
- // node_modules/@arcgis/core/renderers/DictionaryRenderer.js
- var p2;
- var c2 = p2 = class extends y4(p) {
- constructor(e4) {
- super(e4), this.config = null, this.fieldMap = null, this.scaleExpression = null, this.scaleExpressionTitle = null, this.url = null, this.type = "dictionary";
- }
- get _loader() {
- return new u2(this.url, this.config, this.fieldMap);
- }
- writeData(e4, r4) {
- e4 && (r4.scalingExpressionInfo = { expression: e4, returnType: "number" });
- }
- writeVisualVariables(e4, r4, s5, i5) {
- (i5 == null ? void 0 : i5.origin) || super.writeVisualVariables(e4, r4, s5, i5);
- }
- clone() {
- return new p2({ config: y(this.config), scaleExpression: this.scaleExpression, scaleExpressionTitle: this.scaleExpressionTitle, fieldMap: y(this.fieldMap), url: y(this.url), visualVariables: y(this.visualVariables) });
- }
- async getSymbolAsync(e4, r4) {
- return this._loader.getSymbolAsync(e4, r4);
- }
- async collectRequiredFields(e4, r4) {
- await this.collectVVRequiredFields(e4, r4), this.scaleExpression && await S2(e4, r4, this.scaleExpression);
- for (const s5 in this.fieldMap) {
- const i5 = this.fieldMap[s5];
- r4.has(i5) && e4.add(i5);
- }
- }
- get arcadeRequired() {
- return true;
- }
- getSymbol() {
- return null;
- }
- getSymbols() {
- return [];
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((e4, r4) => e4 + r4.getAttributeHash(), "");
- }
- getMeshHash() {
- return `${this.url}-${JSON.stringify(this.fieldMap)}`;
- }
- getSymbolFields() {
- return this._loader.getSymbolFields();
- }
- };
- e([y2({ type: u2 })], c2.prototype, "_loader", null), e([y2({ type: Object, json: { read: { source: "configuration" }, write: { target: "configuration" } } })], c2.prototype, "config", void 0), e([y2({ type: Object, json: { write: true } })], c2.prototype, "fieldMap", void 0), e([y2({ type: String, json: { read: { source: "scalingExpressionInfo.expression" }, write: true } })], c2.prototype, "scaleExpression", void 0), e([r2("scaleExpression")], c2.prototype, "writeData", null), e([y2({ type: String, json: { read: { source: "scalingExpressionInfo.title" }, write: { target: "scalingExpressionInfo.title", overridePolicy(e4) {
- return { enabled: !!e4 && !!this.scaleExpression };
- } } } })], c2.prototype, "scaleExpressionTitle", void 0), e([y2({ type: String, json: { write: true } })], c2.prototype, "url", void 0), e([r2("visualVariables")], c2.prototype, "writeVisualVariables", null), c2 = p2 = e([n("esri.renderers.DictionaryRenderer")], c2);
- var u3 = c2;
- // node_modules/@arcgis/core/renderers/support/AttributeColorInfo.js
- var n2;
- var u4 = n2 = class extends l {
- constructor(e4) {
- super(e4), this.color = null, this.field = null, this.label = null, this.valueExpression = null, this.valueExpressionTitle = null;
- }
- castField(e4) {
- return null == e4 ? e4 : "function" == typeof e4 ? (s.getLogger(this.declaredClass).error(".field: field must be a string value"), null) : u(e4);
- }
- 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([y2({ type: l2, json: { type: [Number], write: true } })], u4.prototype, "color", void 0), e([y2({ type: String, json: { write: true } })], u4.prototype, "field", void 0), e([s3("field")], u4.prototype, "castField", null), e([y2({ type: String, json: { write: true } })], u4.prototype, "label", void 0), e([y2({ type: String, json: { write: true } })], u4.prototype, "valueExpression", void 0), e([y2({ type: String, json: { write: true } })], u4.prototype, "valueExpressionTitle", void 0), u4 = n2 = e([n("esri.renderers.support.AttributeColorInfo")], u4);
- var a2 = u4;
- // node_modules/@arcgis/core/renderers/support/DotDensityLegendOptions.js
- var e3;
- var p3 = e3 = class extends l {
- constructor() {
- super(...arguments), this.unit = null;
- }
- clone() {
- return new e3({ unit: this.unit });
- }
- };
- e([y2({ type: String, json: { write: true } })], p3.prototype, "unit", void 0), p3 = e3 = e([n("esri.renderers.support.DotDensityLegendOptions")], p3);
- var c3 = p3;
- // node_modules/@arcgis/core/renderers/DotDensityRenderer.js
- var h;
- var m2 = h = class extends y4(p) {
- constructor(t4) {
- super(t4), this.attributes = null, this.backgroundColor = new l2([0, 0, 0, 0]), this.dotBlendingEnabled = true, this.dotShape = "square", this.dotSize = 1, this.legendOptions = null, this.outline = new m(), this.dotValue = null, this.referenceScale = null, this.seed = 1, this.type = "dot-density";
- }
- calculateDotValue(t4) {
- if (null == this.referenceScale)
- return this.dotValue;
- const e4 = t4 / this.referenceScale * this.dotValue;
- return e4 < 1 ? 1 : e4;
- }
- getSymbol() {
- return new S({ outline: this.outline });
- }
- async getSymbolAsync() {
- return this.getSymbol();
- }
- getSymbols() {
- return [this.getSymbol()];
- }
- getAttributeHash() {
- var _a, _b;
- return (_b = (_a = this.attributes) == null ? void 0 : _a.reduce((t4, e4) => t4 + e4.getAttributeHash(), "")) != null ? _b : "";
- }
- getMeshHash() {
- return JSON.stringify(this.outline);
- }
- clone() {
- return new h({ attributes: y(this.attributes), backgroundColor: y(this.backgroundColor), dotBlendingEnabled: y(this.dotBlendingEnabled), dotShape: y(this.dotShape), dotSize: y(this.dotSize), dotValue: y(this.dotValue), legendOptions: y(this.legendOptions), outline: y(this.outline), referenceScale: y(this.referenceScale), visualVariables: y(this.visualVariables), authoringInfo: this.authoringInfo && this.authoringInfo.clone() });
- }
- getControllerHash() {
- var _a;
- const t4 = (_a = this.attributes) == null ? void 0 : _a.map((t5) => t5.field || t5.valueExpression || "");
- return `${t4}-${this.outline && JSON.stringify(this.outline.toJSON()) || ""}`;
- }
- async collectRequiredFields(t4, e4) {
- var _a;
- await this.collectVVRequiredFields(t4, e4);
- for (const o3 of (_a = this.attributes) != null ? _a : [])
- o3.valueExpression && await S2(t4, e4, o3.valueExpression), o3.field && t4.add(o3.field);
- }
- };
- e([y2({ type: [a2], json: { write: true } })], m2.prototype, "attributes", void 0), e([y2({ type: l2, json: { write: true } })], m2.prototype, "backgroundColor", void 0), e([y2({ type: Boolean, json: { write: true } })], m2.prototype, "dotBlendingEnabled", void 0), e([y2({ type: String, json: { write: false } })], m2.prototype, "dotShape", void 0), e([y2({ type: Number, json: { write: true } })], m2.prototype, "dotSize", void 0), e([y2({ type: c3, json: { write: true } })], m2.prototype, "legendOptions", void 0), e([y2({ type: m, json: { default: null, write: true } })], m2.prototype, "outline", void 0), e([y2({ type: Number, json: { write: true } })], m2.prototype, "dotValue", void 0), e([y2({ type: Number, json: { write: true } })], m2.prototype, "referenceScale", void 0), e([y2({ type: Number, json: { write: true } })], m2.prototype, "seed", void 0), e([r3({ dotDensity: "dot-density" })], m2.prototype, "type", void 0), m2 = h = e([n("esri.renderers.DotDensityRenderer")], m2);
- var y5 = m2;
- // node_modules/@arcgis/core/renderers/support/HeatmapColorStop.js
- var c4;
- var i3 = c4 = class extends l {
- constructor(o3) {
- super(o3), this.color = null, this.ratio = null;
- }
- clone() {
- return new c4({ color: this.color, ratio: this.ratio });
- }
- };
- e([y2({ type: l2, json: { type: [T], default: null, write: true } })], i3.prototype, "color", void 0), e([y2({ type: Number, json: { write: true } })], i3.prototype, "ratio", void 0), i3 = c4 = e([n("esri.renderers.support.HeatmapColorStop")], i3);
- var a3 = i3;
- // node_modules/@arcgis/core/renderers/support/HeatmapLegendOptions.js
- var p4 = class extends i2(l) {
- constructor() {
- super(...arguments), this.minLabel = null, this.maxLabel = null, this.title = null;
- }
- };
- e([y2({ type: String, json: { write: true } })], p4.prototype, "minLabel", void 0), e([y2({ type: String, json: { write: true } })], p4.prototype, "maxLabel", void 0), e([y2({ 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 j2;
- var D = "esri.renderers.HeatmapRenderer";
- var I = s.getLogger(D);
- function S3(e4) {
- if (null != e4) {
- const { maxDensity: t4, minDensity: i5, radius: s5 } = e4;
- if (null != t4 || null != i5 || null != s5) {
- const { blurRadius: t5, maxPixelIntensity: i6, minPixelIntensity: s6, ...r4 } = e4;
- return r4;
- }
- }
- return e4;
- }
- var v2 = j2 = class extends p {
- constructor(e4) {
- super(e4), 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(e4) {
- return S3(e4);
- }
- get blurRadius() {
- return c(this.radius);
- }
- set blurRadius(e4) {
- const t4 = this.maxPixelIntensity, i5 = this.minPixelIntensity;
- this._set("radius", i(e4)), this._warnAboutDeprecatedGaussianBlurProp("blurRadius", "radius"), this._set("maxDensity", t4 * this._pixelIntensityToDensity), this._set("minDensity", i5 * this._pixelIntensityToDensity);
- }
- get maxPixelIntensity() {
- return this.maxDensity / this._pixelIntensityToDensity;
- }
- set maxPixelIntensity(e4) {
- this._set("maxDensity", e4 * this._pixelIntensityToDensity), this._warnAboutDeprecatedGaussianBlurProp("maxPixelIntensity", "maxDensity");
- }
- get minPixelIntensity() {
- return this.minDensity / this._pixelIntensityToDensity;
- }
- set minPixelIntensity(e4) {
- this._set("minDensity", e4 * this._pixelIntensityToDensity), this._warnAboutDeprecatedGaussianBlurProp("minPixelIntensity", "minDensity");
- }
- get _pixelIntensityToDensity() {
- return 24 / (a ** 2 * this.blurRadius ** 4);
- }
- _warnAboutDeprecatedGaussianBlurProp(e4, t4) {
- if (this._warnedProps[e4])
- return;
- "user" === e2(this).getDefaultOrigin() && (this._warnedProps[e4] = true, v(() => {
- t(I, e4, { replacement: `${String(t4)} (suggested value: ${this._get(t4)})`, version: "4.24" });
- }));
- }
- read(e4, t4) {
- e4 = S3(e4), super.read(e4, t4);
- }
- getSymbol() {
- return new y3();
- }
- async getSymbolAsync() {
- return this.getSymbol();
- }
- getSymbols() {
- return [this.getSymbol()];
- }
- async collectRequiredFields(e4, t4) {
- const i5 = this.field, s5 = this.valueExpression;
- i5 && "string" == typeof i5 && await w(e4, t4, i5), s5 && "string" == typeof s5 && await S2(e4, t4, s5);
- }
- getAttributeHash() {
- return null;
- }
- getMeshHash() {
- return `${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`;
- }
- clone() {
- return new j2({ authoringInfo: this.authoringInfo && this.authoringInfo.clone(), colorStops: y(this.colorStops), field: this.field, legendOptions: y(this.legendOptions), maxDensity: this.maxDensity, minDensity: this.minDensity, radius: this.radius, referenceScale: this.referenceScale, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle });
- }
- };
- e([y2({ type: j, json: { write: true, origins: { "web-scene": { write: false, read: false } } } })], v2.prototype, "authoringInfo", void 0), e([y2({ type: Number, json: { origins: { "portal-item": { write: true }, "web-map": { write: true } } } })], v2.prototype, "blurRadius", null), e([y2({ type: [a3], json: { write: true } })], v2.prototype, "colorStops", void 0), e([y2({ type: String, json: { write: true } })], v2.prototype, "field", void 0), e([y2({ type: Number, json: { write: { overridePolicy: (e4, t4, i5) => ({ enabled: null == i5 }) }, origins: { "web-scene": { write: false } } } })], v2.prototype, "fieldOffset", void 0), e([y2({ type: p4, json: { write: true } })], v2.prototype, "legendOptions", void 0), e([y2({ type: Number, json: { write: true } })], v2.prototype, "maxDensity", void 0), e([y2({ type: Number, json: { origins: { "portal-item": { write: true }, "web-map": { write: true } } } })], v2.prototype, "maxPixelIntensity", null), e([y2({ type: Number, json: { write: true } })], v2.prototype, "minDensity", void 0), e([y2({ type: Number, json: { origins: { "portal-item": { write: true }, "web-map": { write: true } } } })], v2.prototype, "minPixelIntensity", null), e([y2({ type: Number, cast: o, json: { write: true } })], v2.prototype, "radius", void 0), e([y2({ type: Number, range: { min: 0 }, json: { default: 0, write: true } })], v2.prototype, "referenceScale", void 0), e([r3({ heatmap: "heatmap" })], v2.prototype, "type", void 0), e([y2({ type: String, json: { write: true, origins: { "web-document": { write: false }, "portal-item": { write: false } } } })], v2.prototype, "valueExpression", void 0), e([y2({ type: String })], v2.prototype, "valueExpressionTitle", void 0), e([y2({ readOnly: true })], v2.prototype, "_pixelIntensityToDensity", null), v2 = j2 = e([n(D)], v2);
- var P = v2;
- // node_modules/@arcgis/core/renderers/support/OthersCategory.js
- var i4 = class extends i2(l) {
- constructor() {
- super(...arguments), this.color = new l2([0, 0, 0, 0]), this.label = null, this.threshold = 0;
- }
- };
- e([y2({ type: l2, json: { write: true } })], i4.prototype, "color", void 0), e([y2({ type: String, json: { write: true } })], i4.prototype, "label", void 0), e([y2({ type: Number, range: { min: 0, max: 1 }, json: { write: true } })], i4.prototype, "threshold", void 0), i4 = e([n("esri.renderers.support.OthersCategory")], i4);
- // node_modules/@arcgis/core/renderers/support/PieChartLegendOptions.js
- var p5 = class extends i2(l) {
- constructor() {
- super(...arguments), this.title = null;
- }
- };
- e([y2({ 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 f = class extends y4(i2(p)) {
- constructor(t4) {
- super(t4), this.attributes = null, this.backgroundFillSymbol = null, this.defaultColor = new l2([0, 0, 0, 0]), this.defaultLabel = null, this.holePercentage = 0, this.othersCategory = new i4(), this.legendOptions = null, this.outline = null, this.size = 12, this.type = "pie-chart";
- }
- getSymbol() {
- var _a;
- return new y3({ size: this.size ? this.size / 2 + (((_a = this.outline) == null ? void 0 : _a.width) || 0) : 0 });
- }
- async getSymbolAsync() {
- return this.getSymbol();
- }
- getSymbols() {
- return [this.getSymbol(), this.backgroundFillSymbol].filter(r);
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((t4, e4) => t4 + e4.getAttributeHash(), "");
- }
- getMeshHash() {
- return this.getSymbols().reduce((t4, e4) => t4 + JSON.stringify(e4), "");
- }
- async collectRequiredFields(t4, e4) {
- await this.collectVVRequiredFields(t4, e4);
- for (const o3 of this.attributes)
- o3.valueExpression && await S2(t4, e4, o3.valueExpression), o3.field && t4.add(o3.field);
- }
- };
- e([y2({ type: [a2], json: { write: true } })], f.prototype, "attributes", void 0), e([y2({ type: S, json: { default: null, write: true } })], f.prototype, "backgroundFillSymbol", void 0), e([y2({ type: l2, json: { write: true } })], f.prototype, "defaultColor", void 0), e([y2({ type: String, json: { write: true } })], f.prototype, "defaultLabel", void 0), e([y2({ type: Number, range: { min: 0, max: 1 }, json: { write: true } })], f.prototype, "holePercentage", void 0), e([y2({ type: i4, json: { write: true } })], f.prototype, "othersCategory", void 0), e([y2({ type: p5, json: { write: true } })], f.prototype, "legendOptions", void 0), e([y2({ type: m, json: { default: null, write: true } })], f.prototype, "outline", void 0), e([y2({ type: Number, cast: o, json: { write: true } })], f.prototype, "size", void 0), e([r3({ pieChart: "pie-chart" })], f.prototype, "type", void 0), f = e([n("esri.renderers.PieChartRenderer")], f);
- var j3 = f;
- // node_modules/@arcgis/core/renderers/SimpleRenderer.js
- var c5;
- var n3 = c5 = class extends y4(p) {
- constructor(e4) {
- super(e4), this.description = null, this.label = null, this.symbol = null, this.type = "simple";
- }
- async collectRequiredFields(e4, s5) {
- await Promise.all([this.collectSymbolFields(e4, s5), this.collectVVRequiredFields(e4, s5)]);
- }
- async collectSymbolFields(e4, s5) {
- await Promise.all(this.getSymbols().map((r4) => r4.collectRequiredFields(e4, s5)));
- }
- getSymbol(e4, s5) {
- return this.symbol;
- }
- async getSymbolAsync(e4, s5) {
- return this.symbol;
- }
- getSymbols() {
- return this.symbol ? [this.symbol] : [];
- }
- getAttributeHash() {
- return this.visualVariables && this.visualVariables.reduce((e4, s5) => e4 + s5.getAttributeHash(), "");
- }
- getMeshHash() {
- return this.getSymbols().reduce((e4, s5) => e4 + 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: y(this.visualVariables), authoringInfo: this.authoringInfo && this.authoringInfo.clone() });
- }
- };
- e([y2({ type: String, json: { write: true } })], n3.prototype, "description", void 0), e([y2({ type: String, json: { write: true } })], n3.prototype, "label", void 0), e([y2(l3)], 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: P, simple: p6, "unique-value": C, "class-breaks": _, "dot-density": y5, dictionary: u3, "pie-chart": j3 }, errorContext: "renderer" };
- var n4 = { key: "type", base: p, typeMap: { simple: p6, "unique-value": C, "class-breaks": _, heatmap: P }, errorContext: "renderer" };
- // node_modules/@arcgis/core/renderers/support/jsonUtils.js
- function t3(e4, r4) {
- return o2(e4, null, r4);
- }
- var s4 = s2({ types: p7 });
- function o2(r4, n5, t4) {
- return r4 ? r4 && (r4.styleName || r4.styleUrl) && "uniqueValue" !== r4.type ? (t4 && t4.messages && t4.messages.push(new t2("renderer:unsupported", "Only UniqueValueRenderer can be referenced from a web style, but found '" + r4.type + "'", { definition: r4, context: t4 })), null) : s4(r4, n5, t4) : null;
- }
- export {
- a3 as a,
- p6 as p,
- p7 as p2,
- n4 as n,
- t3 as t,
- o2 as o
- };
- //# sourceMappingURL=chunk-RHFU6KWO.js.map
|