/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
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,ifElse as a,or as n,Bool as c,Vec2 as m}from"../../graph/glsl.js";import{AAnimatedShader as p,getValue as d,AAnimatedVertexInput as u,AAnimatedFragmentInput as b}from"./AAnimatedShader.js";import{MarkerConstants as h}from"../markers/markerConstants.js";import{getBitBool as x}from"../shaders/utils.js";import{getVisualVariableColor as y,getVisualVariableOpacity as P}from"../shaders/vvUtils.js";class v extends u{}t([e(9,l)],v.prototype,"tlbr",void 0),t([e(10,i)],v.prototype,"angle",void 0);class S extends o{}t([e(13,m)],S.prototype,"nextPos1",void 0),t([e(14,m)],S.prototype,"nextPos2",void 0);class g extends b{}class f extends p{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:m,unscaledDistanceToPx:p,vvScale:u,strokeWidth:b,scaleSymbolsProportionally:v,scale:S,isSDF:g,baseSize:f,clip:w}=this._vertexPreamble(t,new i(0),t.lineLength||new i(0)),k=this._toNdc(e);let j=d(o,1,s);j=new l(j.rgb.multiply(j.a),j.a);let z=a(x(t.bitset,h.bitset.colorLocked),j,d(o,2,s));z=new l(z.rgb.multiply(z.a),z.a);let D=d(o,3,s);D=new l(D.rgb.multiply(D.a),D.a);const T=d(o,4,s).a,_=d(o,5,s).a,C=y(this,t.id,j,n(x(t.bitset,h.bitset.colorLocked),new c(m))),F=r(C,z,D),A=P(this,t.id),L=r(A,T,_),W=F.multiply(L),O=this.clip(t.id,t.zoomRange).add(w.multiply(2)),G=p.multiply(u);return{unscaledDistanceToPx:p,vvScale:u,strokeWidth:b,scaleSymbolsProportionally:v,scale:S,isSDF:g,baseSize:f,ndc:k,color:W,z:O,isOutline:m,evalParams:s,distanceToPx:G}}}export{f as AAnimatedPolyShader,g as PolyFragmentInput,S as PolyHittestVertexInput,v as PolyVertexInput};
