/*
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 s}from"tslib";import{uniform as t,UniformGroup as e}from"../../GraphShaderModule.js";import{FixedArray as i,Float as r,cond as o,greaterThan as a,mix as l,greaterThanEqual as p,lessThanEqual as u,ifElse as h}from"../../graph/glsl.js";import{isNan as d}from"./utils.js";class f extends e{getSize(s,t){const e=o([d(s),t],[u(s,this.values.first()),this.sizes.first()],[p(s,this.values.last()),this.sizes.last()],[!0,()=>{const t=this.values.findIndex(t=>a(t,s)),e=this.values.get(t),i=t.subtract(1),r=this.values.get(i),o=s.subtract(r).divide(e.subtract(r));return l(this.sizes.get(i),this.sizes.get(t),o)}]);return h(d(e),t,e)}}s([t(i.ofType(r,8))],f.prototype,"sizes",void 0),s([t(i.ofType(r,8))],f.prototype,"values",void 0);export{f as VisualVariableSizeStops};
