text: import{l as e,D as t,E as s,bU as i,ag as r,K as n,L as o,bV as l,bW as a,bX as u,bY as d,s as h,aP as c,bZ as p,J as y,b_ as b,b$ as v,i as w,c0 as m,bC as g,b3 as f,m as S,bH as j}from"./p-ab028778.js";import{r as x,$ as N,C as H}from"./p-754df0ae.js";var R;const q=e.getLogger("esri.renderers.support.AttributeColorInfo");let V=R=class extends o{constructor(e){super(e),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(e){return null==e?e:"function"==typeof e?(q.error(".field: field must be a string value"),null):l(e)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){return new R({color:this.color&&this.color.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};t([s({type:i,json:{type:[Number],write:!0}})],V.prototype,"color",void 0),t([s({type:String,json:{write:!0}})],V.prototype,"field",void 0),t([r("field")],V.prototype,"castField",null),t([s({type:String,json:{write:!0}})],V.prototype,"label",void 0),t([s({type:String,json:{write:!0}})],V.prototype,"valueExpression",void 0),t([s({type:String,json:{write:!0}})],V.prototype,"valueExpressionTitle",void 0),V=R=t([n("esri.renderers.support.AttributeColorInfo")],V);var C,D=V;let O=C=class extends o{constructor(){super(...arguments),this.unit=null}clone(){return new C({unit:this.unit})}};t([s({type:String,json:{write:!0}})],O.prototype,"unit",void 0),O=C=t([n("esri.renderers.support.DotDensityLegendOptions")],O);var $,A=O;let E=$=class extends(a(b)){constructor(e){super(e),this.attributes=null,this.backgroundColor=new i([0,0,0,0]),this.blendDots=!0,this.dotBlendingEnabled=!0,this.dotShape="square",this.dotSize=1,this.legendOptions=null,this.outline=new u,this.dotValue=null,this.referenceDotValue=null,this.referenceScale=null,this.seed=1,this.type="dot-density"}calculateDotValue(e){if(null==this.referenceScale)return this.dotValue;const t=e/this.referenceScale*this.dotValue;return t<1?1:t}getSymbol(){return new d({outline:this.outline})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}getAttributeHash(){return this.attributes&&this.attributes.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return JSON.stringify(this.outline)}clone(){return new $({attributes:h(this.attributes),backgroundColor:h(this.backgroundColor),dotBlendingEnabled:h(this.dotBlendingEnabled),dotShape:h(this.dotShape),dotSize:h(this.dotSize),dotValue:h(this.dotValue),legendOptions:h(this.legendOptions),outline:h(this.outline),referenceScale:h(this.referenceScale),visualVariables:h(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}getControllerHash(){return`${this.attributes.map((e=>e.field||e.valueExpression||""))}-${this.outline&&JSON.stringify(this.outline.toJSON())||""}`}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const s of this.attributes)s.valueExpression&&await c(e,t,s.valueExpression),s.field&&e.add(s.field)}};t([s({type:[D],json:{write:!0}})],E.prototype,"attributes",void 0),t([s({type:i,json:{write:!0}})],E.prototype,"backgroundColor",void 0),t([s({type:Boolean}),p("dotBlendingEnabled")],E.prototype,"blendDots",void 0),t([s({type:Boolean,json:{write:!0}})],E.prototype,"dotBlendingEnabled",void 0),t([s({type:String,json:{write:!1}})],E.prototype,"dotShape",void 0),t([s({type:Number,json:{write:!1}})],E.prototype,"dotSize",void 0),t([s({type:A,json:{write:!0}})],E.prototype,"legendOptions",void 0),t([s({type:u,json:{default:null,write:!0}})],E.prototype,"outline",void 0),t([s({type:Number,json:{write:!0}})],E.prototype,"dotValue",void 0),t([s({type:Number}),p("dotValue")],E.prototype,"referenceDotValue",void 0),t([s({type:Number,json:{write:!0}})],E.prototype,"referenceScale",void 0),t([s({type:Number,json:{write:!0}})],E.prototype,"seed",void 0),t([y({dotDensity:"dot-density"})],E.prototype,"type",void 0),E=$=t([n("esri.renderers.DotDensityRenderer")],E);var I,k=E;let F=I=class extends o{constructor(e){super(e),this.color=null,this.ratio=null}clone(){return new I({color:this.color,ratio:this.ratio})}};t([s({type:i,json:{write:!0}})],F.prototype,"color",void 0),t([s({type:Number,json:{write:!0}})],F.prototype,"ratio",void 0),F=I=t([n("esri.renderers.support.HeatmapColorStop")],F);var P,B=F;let J=P=class extends b{constructor(e){super(e),this.blurRadius=10,this.colorStops=[new B({ratio:0,color:new i("rgba(255, 140, 0, 0)")}),new B({ratio:.75,color:new i("rgba(255, 140, 0, 1)")}),new B({ratio:.9,color:new i("rgba(255, 0,   0, 1)")})],this.field=null,this.fieldOffset=0,this.maxPixelIntensity=100,this.minPixelIntensity=0,this.type="heatmap"}async collectRequiredFields(e,t){const s=this.field;s&&"string"==typeof s&&v(e,t,s)}getAttributeHash(){return null}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new P({blurRadius:this.blurRadius,colorStops:h(this.colorStops),field:this.field,maxPixelIntensity:this.maxPixelIntensity,minPixelIntensity:this.minPixelIntensity})}};t([s({type:Number,json:{write:!0}})],J.prototype,"blurRadius",void 0),t([s({type:[B],json:{write:!0}})],J.prototype,"colorStops",void 0),t([s({type:String,json:{write:!0}})],J.prototype,"field",void 0),t([s({type:Number,json:{write:{overridePolicy:(e,t,s)=>({enabled:null==s})}}})],J.prototype,"fieldOffset",void 0),t([s({type:Number,json:{write:!0}})],J.prototype,"maxPixelIntensity",void 0),t([s({type:Number,json:{write:!0}})],J.prototype,"minPixelIntensity",void 0),t([y({heatmap:"heatmap"})],J.prototype,"type",void 0),J=P=t([n("esri.renderers.HeatmapRenderer")],J);var M,z=J;let L=M=class extends(a(b)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await w([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await w(this.getSymbols().map((s=>s.collectRequiredFields(e,t))))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}getSymbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return this.getSymbols().reduce(((e,t)=>e+JSON.stringify(t)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new M({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:h(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}};t([s({type:String,json:{write:!0}})],L.prototype,"description",void 0),t([s({type:String,json:{write:!0}})],L.prototype,"label",void 0),t([s(x)],L.prototype,"symbol",void 0),t([y({simple:"simple"})],L.prototype,"type",void 0),L=M=t([n("esri.renderers.SimpleRenderer")],L);var T=L;const U={key:"type",base:b,typeMap:{heatmap:z,simple:T,"unique-value":N,"class-breaks":H,"dot-density":k,dictionary:m},errorContext:"renderer"},K={key:"type",base:b,typeMap:{simple:T,"unique-value":N,"class-breaks":H},errorContext:"renderer"};function W(e,t,s,i){const r=function(e,t){return e?function(e,t){if(!t||"web-scene"!==t.origin)return!0;switch(e.type){case"simple":case"unique-value":case"class-breaks":return!0;case"heatmap":case"dictionary":case"dot-density":default:return!1}}(e,t)?e.write({},t):(t.messages&&t.messages.push(new S("renderer:unsupported",`Renderer of type '${e.declaredClass}' are not supported in scenes.`,{renderer:e,context:t})),null):null}(e,i);r&&j(s,r,t)}const X=g({types:U});function Y(e,t,s){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(s&&s.messages&&s.messages.push(new f("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:s})),null):X(e,t,s):null}export{Y as a,K as b,U as m,T as n,W as o}