import { U } from "./chunk-ZIWBDWEW.js"; import { a as a2 } from "./chunk-Q4LKAPDF.js"; import { E, S } from "./chunk-23ONSYIH.js"; import { r as r2, s as s4 } from "./chunk-WFSV2B2I.js"; import { C } from "./chunk-MI7HWWFL.js"; import { e as e3 } from "./chunk-ZHRMTKME.js"; import { s as s3 } from "./chunk-XLV7RUSE.js"; import { l } from "./chunk-7XXXCK2A.js"; import { d as d2, e as e2, n as n3 } from "./chunk-WJW5DUN6.js"; import { u } from "./chunk-WEMIK25H.js"; import { n as n2 } from "./chunk-DT6EAZQ5.js"; import { d, e, n2 as n, y3 as y } from "./chunk-Y3WMVFTW.js"; import { D } from "./chunk-ULGDPLM2.js"; import { s, s3 as s2 } from "./chunk-EMJ4ZSM2.js"; import { m } from "./chunk-IKP3YN53.js"; import { a, r, t } from "./chunk-GZT4BVFP.js"; // node_modules/@arcgis/core/layers/effects/EffectView.js var a3 = -1; var h = class extends y { constructor(t2) { super(t2), this._from = null, this._to = null, this._final = null, this._current = [], this._time = 0, this.duration = a("mapview-transitions-duration"), this.effects = []; } set effect(t2) { if (this._get("effect") !== (t2 = t2 || "")) { this._set("effect", t2); try { this._transitionTo(u2(t2)); } catch (e5) { this._transitionTo([]), s.getLogger(this.declaredClass).warn("Invalid Effect", { effect: t2, error: e5 }); } } } get hasEffects() { return this.transitioning || !!this.effects.length; } set scale(t2) { this._updateForScale(t2); } get transitioning() { return this._to !== null; } canTransitionTo(t2) { try { return this.scale > 0 && _(this._current, u2(t2), this.scale); } catch { return false; } } transitionStep(t2, e5) { this._applyTimeTransition(t2), this._updateForScale(e5); } end() { this._applyTimeTransition(this.duration); } _transitionTo(t2) { this.scale > 0 && _(this._current, t2, this.scale) ? (this._final = t2, this._to = m(t2), p(this._current, this._to, this.scale), this._from = m(this._current), this._time = 0) : (this._from = this._to = this._final = null, this._current = t2), this._set("effects", this._current[0] ? m(this._current[0].effects) : []); } _applyTimeTransition(t2) { if (!(this._to && this._from && this._current && this._final)) return; this._time += t2; const e5 = Math.min(1, this._time / this.duration); for (let s7 = 0; s7 < this._current.length; s7++) { const t3 = this._current[s7], r4 = this._from[s7], i = this._to[s7]; t3.scale = m2(r4.scale, i.scale, e5); for (let s8 = 0; s8 < t3.effects.length; s8++) { const n6 = t3.effects[s8], c2 = r4.effects[s8], o = i.effects[s8]; n6.interpolate(c2, o, e5); } } e5 === 1 && (this._current = this._final, this._set("effects", this._current[0] ? m(this._current[0].effects) : []), this._from = this._to = this._final = null); } _updateForScale(t2) { if (this._set("scale", t2), this._current.length === 0) return; const e5 = this._current, s7 = this._current.length - 1; let r4, i, n6 = 1; if (e5.length === 1 || t2 >= e5[0].scale) i = r4 = e5[0].effects; else if (t2 <= e5[s7].scale) i = r4 = e5[s7].effects; else for (let c2 = 0; c2 < s7; c2++) { const s8 = e5[c2], o = e5[c2 + 1]; if (s8.scale >= t2 && o.scale <= t2) { n6 = (t2 - s8.scale) / (o.scale - s8.scale), r4 = s8.effects, i = o.effects; break; } } for (let c2 = 0; c2 < this.effects.length; c2++) { this.effects[c2].interpolate(r4[c2], i[c2], n6); } } }; function u2(t2) { const e5 = d2(t2) || []; return g(e5) ? [{ scale: a3, effects: e5 }] : e5; } function _(t2, e5, s7) { if (!t2[0]?.effects || !e5[0]?.effects) return true; return !((t2[0]?.scale === a3 || e5[0]?.scale === a3) && (t2.length > 1 || e5.length > 1) && s7 <= 0) && n3(t2[0].effects, e5[0].effects); } function p(t2, e5, s7) { const r4 = t2.length > e5.length ? t2 : e5, i = t2.length > e5.length ? e5 : t2, n6 = i[i.length - 1], c2 = n6?.scale ?? s7, o = n6?.effects ?? []; for (let f = i.length; f < r4.length; f++) i.push({ scale: c2, effects: [...o] }); for (let f = 0; f < r4.length; f++) i[f].scale = i[f].scale === a3 ? s7 : i[f].scale, r4[f].scale = r4[f].scale === a3 ? s7 : r4[f].scale, e2(i[f].effects, r4[f].effects); } function m2(t2, e5, s7) { return t2 + (e5 - t2) * s7; } function g(t2) { const e5 = t2[0]; return !!e5 && "type" in e5; } e([d()], h.prototype, "_to", void 0), e([d()], h.prototype, "duration", void 0), e([d({ value: "" })], h.prototype, "effect", null), e([d({ readOnly: true })], h.prototype, "effects", void 0), e([d({ readOnly: true })], h.prototype, "hasEffects", null), e([d({ value: 0 })], h.prototype, "scale", null), e([d({ readOnly: true })], h.prototype, "transitioning", null), h = e([n("esri.layers.effects.EffectView")], h); // node_modules/@arcgis/core/views/2d/engine/DisplayObject.js var r3 = 1 / a("mapview-transitions-duration"); var a4 = class extends n2 { constructor() { super(...arguments), this._fadeOutResolver = null, this._fadeInResolver = null, this._clips = null, this.computedVisible = true, this.computedOpacity = 1, this.fadeTransitionEnabled = false, this.inFadeTransition = false, this._isReady = false, this._opacity = 1, this._stage = null, this._visible = true; } get clips() { return this._clips; } set clips(e5) { this._clips = e5, this.requestRender(); } get isReady() { return this._isReady; } get opacity() { return this._opacity; } set opacity(e5) { this._opacity !== e5 && (this._opacity = Math.min(1, Math.max(e5, 0)), this.requestRender()); } get stage() { return this._stage; } set stage(e5) { if (this._stage === e5) return; const t2 = this._stage; this._stage = e5, e5 ? this._stage.untrashDisplayObject(this) || (this.onAttach(), this.emit("attach")) : t2.trashDisplayObject(this); } get transforms() { return this._getTransforms(); } _getTransforms() { return t(this._transforms) && (this._transforms = this._createTransforms()), this._transforms; } get visible() { return this._visible; } set visible(e5) { this._visible !== e5 && (this._visible = e5, this.requestRender()); } fadeIn() { return this._fadeInResolver || (this._fadeOutResolver && (this._fadeOutResolver(), this._fadeOutResolver = null), this.computedOpacity = 0, this.fadeTransitionEnabled = true, this._fadeInResolver = D(), this.requestRender()), this._fadeInResolver.promise; } fadeOut() { return this._fadeOutResolver || (this._fadeInResolver && (this._fadeInResolver(), this._fadeInResolver = null), this.fadeTransitionEnabled = true, this._fadeOutResolver = D(), this.requestRender()), this._fadeOutResolver.promise; } beforeRender(e5) { this.updateTransitionProperties(e5.deltaTime, e5.state.scale); } afterRender(e5) { this._fadeInResolver && this.computedOpacity === this.opacity ? (this._fadeInResolver(), this._fadeInResolver = null) : this._fadeOutResolver && this.computedOpacity === 0 && (this._fadeOutResolver(), this._fadeOutResolver = null); } remove() { this.parent?.removeChild(this); } setTransform(e5) { } processRender(e5) { this.stage && this.computedVisible && this.doRender(e5); } requestRender() { this.stage && this.stage.requestRender(); } processDetach() { this._fadeInResolver && (this._fadeInResolver(), this._fadeInResolver = null), this._fadeOutResolver && (this._fadeOutResolver(), this._fadeOutResolver = null), this.onDetach(), this.emit("detach"); } updateTransitionProperties(e5, t2) { if (this.fadeTransitionEnabled) { const t3 = this._fadeOutResolver || !this.visible ? 0 : this.opacity, s7 = this.computedOpacity; if (s7 === t3) this.computedVisible = this.visible; else { const i = e5 * r3; this.computedOpacity = s7 > t3 ? Math.max(t3, s7 - i) : Math.min(t3, s7 + i), this.computedVisible = this.computedOpacity > 0; const a5 = t3 === this.computedOpacity; this.inFadeTransition = !a5, a5 || this.requestRender(); } } else this.computedOpacity = this.opacity, this.computedVisible = this.visible; } onAttach() { } onDetach() { } doRender(e5) { } ready() { this._isReady || (this._isReady = true, this.emit("isReady"), this.requestRender()); } }; // node_modules/@arcgis/core/views/2d/engine/Container.js var s5 = class extends a4 { constructor() { super(...arguments), this._childrenSet = new Set(), this._needsSort = false, this.children = [], this._effectView = null; } get blendMode() { return this._blendMode; } set blendMode(e5) { this._blendMode = e5, this.requestRender(); } get clips() { return this._clips; } set clips(e5) { this._clips = e5, this.children.forEach((t2) => t2.clips = e5); } get computedEffects() { return this._effectView?.effects ?? null; } get effect() { return this._effectView?.effect ?? ""; } set effect(e5) { (this._effectView || e5) && (this._effectView || (this._effectView = new h()), this._effectView.effect = e5, this.requestRender()); } updateTransitionProperties(e5, t2) { super.updateTransitionProperties(e5, t2), this._effectView && (this._effectView.transitionStep(e5, t2), this._effectView.transitioning && this.requestRender()); } doRender(e5) { const t2 = this.createRenderParams(e5); this.renderChildren(t2); } addChild(e5) { return this.addChildAt(e5, this.children.length); } addChildAt(e5, t2 = this.children.length) { if (!e5) return e5; if (this.contains(e5)) return e5; this._needsSort = true; const i = e5.parent; return i && i !== this && i.removeChild(e5), t2 >= this.children.length ? this.children.push(e5) : this.children.splice(t2, 0, e5), this._childrenSet.add(e5), e5.parent = this, e5.stage = this.stage, this !== this.stage && (e5.clips = this.clips), this.requestRender(), e5; } contains(e5) { return this._childrenSet.has(e5); } removeAllChildren() { this._childrenSet.clear(), this._needsSort = true; for (const e5 of this.children) this !== this.stage && (e5.clips = null), e5.stage = null, e5.parent = null; this.children.length = 0; } removeChild(e5) { return this.contains(e5) ? this.removeChildAt(this.children.indexOf(e5)) : e5; } removeChildAt(e5) { if (e5 < 0 || e5 >= this.children.length) return null; this._needsSort = true; const t2 = this.children.splice(e5, 1)[0]; return this._childrenSet.delete(t2), this !== this.stage && (t2.clips = null), t2.stage = null, t2.parent = null, t2; } sortChildren(e5) { this._needsSort && (this.children.sort(e5), this._needsSort = false); } _createTransforms() { return { dvs: e3() }; } onAttach() { super.onAttach(); const e5 = this.stage; for (const t2 of this.children) t2.stage = e5; } onDetach() { super.onDetach(); for (const e5 of this.children) e5.stage = null; } renderChildren(e5) { for (const t2 of this.children) t2.beforeRender(e5); for (const t2 of this.children) t2.processRender(e5); for (const t2 of this.children) t2.afterRender(e5); } createRenderParams(e5) { return { ...e5, blendMode: this.blendMode, effects: this.computedEffects, globalOpacity: e5.globalOpacity * this.computedOpacity, inFadeTransition: this.inFadeTransition }; } }; // node_modules/@arcgis/core/views/2d/engine/webgl/techniques/Technique.js var e4 = class { static getStorageSpec(t2) { return null; } static createOrUpdateRendererSchema(e5, r4) { return r(e5) && e5.type === "default" ? e5 : { type: "default" }; } static getVariation(t2) { return {}; } static getVariationHash(t2) { return 0; } }; e4.type = "default", e4.programSpec = null; // node_modules/@arcgis/core/views/2d/engine/webgl/techniques/dotDensity/TechniqueDotDensity.js var n4 = class extends e4 { static getStorageSpec({ attributes: e5 }) { return { visualVariables: false, attributes: e5 ?? null }; } static _createRendererSchema() { return { type: "dot-density", colors: new Float32Array(32), dotValue: -1, dotSize: -1, dotScale: -1, dotBlending: false, backgroundColor: new Float32Array(4), activeDots: new Float32Array(8), seed: -1 }; } static createOrUpdateRendererSchema(r4, a5) { const { attributes: n6, dotValue: i, referenceScale: d3, dotSize: l3, dotBlendingEnabled: s7, seed: c2, backgroundColor: u3 } = a5, m3 = r(r4) && r4.type === "dot-density" ? r4 : this._createRendererSchema(); m3.dotValue = i, m3.dotSize = l3, m3.dotScale = d3, m3.dotBlending = s7, m3.seed = c2; const { colors: g2, activeDots: p3, backgroundColor: y2 } = m3; for (let e5 = 0; e5 < r2; e5++) { const o = e5 >= n6.length ? null : n6[e5].color; a2(g2, o, 4 * e5); } for (let e5 = 0; e5 < 8; e5++) p3[e5] = e5 < a5.attributes.length ? 1 : 0; return a2(y2, u3), m3; } static getVariation(e5) { return { ddDotBlending: e5.dotBlending }; } static getVariationHash(e5) { return e5.dotBlending ? 1 : 0; } }; n4.type = "dot-density", n4.programSpec = { shader: "materials/fill", vertexLayout: { geometry: [{ location: 0, name: "a_pos", count: 2, type: C.SHORT }, { location: 1, name: "a_id", count: 3, type: C.UNSIGNED_BYTE }, { location: 2, name: "a_bitset", count: 1, type: C.UNSIGNED_BYTE }, { location: 3, name: "a_inverseArea", count: 1, type: C.FLOAT }] } }; // node_modules/@arcgis/core/views/2d/engine/webgl/techniques/heatmap/TechniqueHeatmap.js var n5 = class extends e4 { static getStorageSpec({ field: e5, valueExpression: t2 }) { return { visualVariables: false, attributes: e5 || t2 ? [{ field: e5, valueExpression: t2 }] : null }; } static _createRendererSchema() { return { type: "heatmap", radius: -1, referenceScale: -1, isFieldActive: 0, minDensity: -1, densityRange: -1, kernel: null, gradient: null, gradientHash: "invalid" }; } static createOrUpdateRendererSchema(a5, i) { const { radius: n6, minDensity: s7, maxDensity: o, referenceScale: c2, field: l3, valueExpression: m3, colorStops: p3 } = i, d3 = o - s7, u3 = l3 || m3 ? 1 : 0, y2 = p3.map(({ color: e5, ratio: t2 }) => `${t2}:${e5.toString()}`).join(); let h2, S2 = true; return r(a5) && a5.type === "heatmap" ? (h2 = a5, S2 = y2 !== a5.gradientHash) : h2 = this._createRendererSchema(), h2.radius = u(n6), h2.minDensity = s7, h2.densityRange = d3, h2.referenceScale = c2, h2.isFieldActive = u3, S2 && (h2.gradient = s3(p3), h2.gradientHash = y2), h2; } }; n5.type = "heatmap", n5.programSpec = { shader: "materials/icon/heatmapAccumulate", vertexLayout: { geometry: [{ location: 0, name: "a_pos", count: 2, type: C.SHORT }, { location: 1, name: "a_vertexOffset", count: 2, type: C.SHORT }, { location: 4, name: "a_id", count: 4, type: C.UNSIGNED_BYTE }] } }; // node_modules/@arcgis/core/views/2d/engine/webgl/techniques/pieChart/TechniquePieChart.js var l2 = class extends e4 { static getStorageSpec({ attributes: e5 }) { return { visualVariables: true, attributes: e5 ?? null }; } static _createRendererSchema() { return { type: "pie-chart", colors: new Float32Array(4 * s4), defaultColor: new Float32Array(4), othersColor: new Float32Array(4), outlineColor: new Float32Array(4), holePercentage: 0, sectorThreshold: 0, outlineWidth: 1, numberOfFields: 10 }; } static createOrUpdateRendererSchema(n6, i) { const { attributes: l3, defaultColor: s7, holePercentage: c2, othersCategory: m3, outline: u3 } = i, d3 = r(n6) && n6.type === "pie-chart" ? n6 : this._createRendererSchema(); for (let t2 = 0; t2 < s4; t2++) { const o = t2 >= l3.length ? new l([0, 0, 0, 0]) : l3[t2].color; a2(d3.colors, o, 4 * t2); } return a2(d3.defaultColor, s7), a2(d3.othersColor, m3?.color), a2(d3.outlineColor, u3?.color), d3.outlineWidth = u(u3?.width || 0), d3.holePercentage = c2, d3.sectorThreshold = m3?.threshold || 0, d3.numberOfFields = l3.length, d3; } static getVariation(e5) { return { numberOfFields: e5.numberOfFields }; } static getVariationHash(e5) { return e5.numberOfFields; } }; l2.type = "pie-chart", l2.programSpec = { shader: "materials/pie", vertexLayout: { geometry: [{ location: 0, name: "a_pos", count: 2, type: C.SHORT }, { location: 1, name: "a_vertexOffset", count: 2, type: C.SHORT }, { location: 2, name: "a_texCoords", count: 2, type: C.UNSIGNED_SHORT }, { location: 3, name: "a_bitSetAndDistRatio", count: 2, type: C.UNSIGNED_SHORT }, { location: 4, name: "a_id", count: 4, type: C.UNSIGNED_BYTE }, { location: 5, name: "a_color", count: 4, type: C.UNSIGNED_BYTE, normalized: true }, { location: 6, name: "a_outlineColor", count: 4, type: C.UNSIGNED_BYTE, normalized: true }, { location: 7, name: "a_sizeAndOutlineWidth", count: 4, type: C.UNSIGNED_BYTE }, { location: 8, name: "a_zoomRange", count: 2, type: C.UNSIGNED_SHORT }] }, hittestAttributes: ["a_vertexOffset", "a_texCoords"] }; // node_modules/@arcgis/core/views/2d/engine/webgl/techniques/utils.js function s6(r4, t2) { if (r4.type !== t2) throw new s2("material-view-model:unexpected-renderer-schema", `expected to find renderer schema of type "${t2}" but found type "${r4.type}"`); } function c(e5) { switch (e5.type) { case "dot-density": return n4; case "heatmap": return n5; case "pie-chart": return l2; default: return e4; } } function p2(e5) { const { geometryType: s7, symbologyType: c2 } = U.load(e5); switch (s7) { case E.FILL: if (c2 === S.DOT_DENSITY) return n4; break; case E.MARKER: switch (c2) { case S.HEATMAP: return n5; case S.PIE_CHART: return l2; } } return e4; } export { h, a4 as a, s5 as s, e4 as e, s6 as s2, c, p2 as p }; //# sourceMappingURL=chunk-YJKEIUMW.js.map