/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t}from"tslib";import{location as e,ComputeVertexInput as o}from"../../GraphShaderModule.js";import{mod as s,Float as i,mix as r,Vec4 as l,or as a,Bool as n,Vec2 as c}from"../../graph/glsl.js";import{AAnimatedShader as m,getValue as p,AAnimatedVertexInput as d,AAnimatedFragmentInput as u}from"./AAnimatedShader.js";import{MarkerConstants as h}from"../markers/markerConstants.js";import{getBitBool as x}from"../shaders/utils.js";import{getVisualVariableColor as P,getVisualVariableOpacity as y}from"../shaders/vvUtils.js";class b extends d{}t([e(9,l)],b.prototype,"tlbr",void 0);class v extends o{}t([e(13,c)],v.prototype,"nextPos1",void 0),t([e(14,c)],v.prototype,"nextPos2",void 0);class S extends u{}class g extends m{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}_fragmentPoly(t){const e=s(t.uv,new i(1)),o=r(t.tlbr.xy,t.tlbr.zw,e);return this._getColor(o,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth})}_vertexPoly(t){const{position:e,animationPointer:o,evalParams:s,isOutline:c,unscaledDistanceToPx:m,vvScale:d,strokeWidth:u,scaleSymbolsProportionally:b,scale:v,isSDF:S,baseSize:g,clip:f}=this._vertexPreamble(t,new i(0),t.lineLength||new i(0)),w=this._toNdc(e);let j=p(o,1,s);j=new l(j.rgb.multiply(j.a),j.a);let k=p(o,2,s);k=new l(k.rgb.multiply(k.a),k.a);let z=p(o,3,s);z=new l(z.rgb.multiply(z.a),z.a);const D=p(o,4,s).a,T=p(o,5,s).a,_=P(this,t.id,j,a(x(t.bitset,h.bitset.colorLocked),new n(c))),C=r(_,k,z),F=y(this,t.id),A=r(F,D,T),W=C.multiply(A),L=this.clip(t.id,t.zoomRange).add(f.multiply(2)),O=m.multiply(d);return{unscaledDistanceToPx:m,vvScale:d,strokeWidth:u,scaleSymbolsProportionally:b,scale:v,isSDF:S,baseSize:g,ndc:w,color:W,z:L,isOutline:c,evalParams:s,distanceToPx:O}}}export{g as AAnimatedPolyShader,S as PolyFragmentInput,v as PolyHittestVertexInput,b as PolyVertexInput};
