{"version":3,"sources":["../src/utils/clampValue.ts"],"sourcesContent":["export const clampValue = (value: number | undefined, max: number): number | undefined => {\n  if (value === undefined) {\n    return value;\n  }\n  const internalValue = value < 0 ? 0 : value > max ? max : value;\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (value < 0) {\n      // eslint-disable-next-line no-console\n      console.error(`The prop 'value' must be greater than or equal to zero. Received value: ${value}`);\n    }\n    if (value > max) {\n      // eslint-disable-next-line no-console\n      console.error(`The prop 'value' must be less than or equal to 'max'. Received value: ${value}, max: ${max}`);\n    }\n  }\n  return internalValue;\n};\n"],"names":["clampValue","value","max","undefined","internalValue","process","env","NODE_ENV","console","error"],"mappings":";;;;+BAAaA;;;;;;AAAN,mBAAmB,CAACC,OAA2BC;IACpD,IAAID,UAAUE,WAAW;QACvB,OAAOF;IACT;IACA,MAAMG,gBAAgBH,QAAQ,IAAI,IAAIA,QAAQC,MAAMA,MAAMD;IAE1D,IAAII,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIN,QAAQ,GAAG;YACb,sCAAsC;YACtCO,QAAQC,KAAK,CAAC,CAAC,wEAAwE,EAAER,OAAO;QAClG;QACA,IAAIA,QAAQC,KAAK;YACf,sCAAsC;YACtCM,QAAQC,KAAK,CAAC,CAAC,sEAAsE,EAAER,MAAM,OAAO,EAAEC,KAAK;QAC7G;IACF;IACA,OAAOE;AACT,EAAE"}