/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{minMaxZoomPrecisionFactor as t,spritePadding as e}from"../../../definitions.js";import{assert as o}from"../../../animations/utils.js";import{packAnimatedBitset as i}from"./AnimatedMeshWriter.js";import{getMinMaxZoom as c}from"../fill/meshWriterUtils.js";import{DataType as n}from"../../../../../../webgl/enums.js";const a={type:n.SHORT,count:2,packPrecisionFactor:t,pack:({scaleInfo:t},{tileInfo:e})=>c(t,e)},s={type:n.FLOAT,count:4,packPrecisionFactor:1,packTessellation:({value1Position2Value2:t})=>(o(t),t)},p={type:n.FLOAT,count:4,packPrecisionFactor:1,packTessellation:()=>[0,0,0,1]},r={type:n.FLOAT,count:1,packPrecisionFactor:1,pack:()=>0},l={type:n.FLOAT,count:1,packPrecisionFactor:1,packTessellation:({lineLength:t})=>t},k={type:n.UNSIGNED_SHORT,count:1,packTessellation:({distance:t})=>t},u={type:n.BYTE,count:2,packPrecisionFactor:16,packTessellation:({directionX:t,directionY:e})=>[t,e]},T={type:n.FLOAT,count:2,packPrecisionFactor:16,packTessellation:({normalX:t,normalY:e})=>[t,e]},m={type:n.UNSIGNED_BYTE,count:3,pack:"id"},y={type:n.UNSIGNED_BYTE,count:1,pack:i},F={type:n.SHORT,count:2,pack:"position",packPrecisionFactor:1},f={marker:{type:n.FLOAT,count:2,packAlternating:{count:4,pack:({texelDimensions:t})=>[[-.5*t[0],-.5*t[1]],[.5*t[0],-.5*t[1]],[-.5*t[0],.5*t[1]],[.5*t[0],.5*t[1]]]}},line:{type:n.FLOAT,count:2,packTessellation:({extrusionOffsetX:t,extrusionOffsetY:e},{baseSize:o})=>[t*o/2,e*o/2]},fill:{type:n.FLOAT,count:2,packTessellation:()=>[0,0]}},O={marker:{type:n.SHORT,count:2,packPrecisionFactor:1,packAlternating:{count:4,packTessellation:({texXmax:t,texXmin:e,texYmax:o,texYmin:i})=>[[e,i],[t,i],[e,o],[t,o]]}}},S={type:n.UNSIGNED_SHORT,count:4,pack:({sprite:t})=>{const{rect:o,width:i,height:c}=t,n=o.x+e,a=o.y+e;return[n+1,a+1,n+i-1,a+c-1]}},d={type:n.UNSIGNED_SHORT,count:4,packPrecisionFactor:4,pack:({animations:t,baseSize:e,referenceSize:o})=>[t.dataColumn,t.dataRow,e,o]},x={type:n.UNSIGNED_SHORT,count:4,packPrecisionFactor:8,pack:({strokeWidth:t,pixelDimensions:e,baseSize:o,sprite:i,sizeRatio:c})=>{const n=Math.max(o*i.width/i.height,o),a=i.sdfDecodeCoeff*n*c;return[e[0],e[1],t,a]}},N={type:n.BYTE,count:1,packTessellation:({angle:t})=>t};export{k as accumulatedDistance,N as angle,d as animationPointerAndBaseSizeAndReferenceSize,y as bitset,m as id,l as lineLength,r as noLineLength,p as noTiming,T as normal,f as offset,F as pos,u as segmentDirection,x as sizing,S as tlbr,O as uv,s as value1Position2Value2,a as zoomRange};
