{"version":3,"names":["asc","replaceArrayItemAtIndex","array","index","newValue","output","slice","sort"],"sources":["replace-array-item-at-index.ts"],"sourcesContent":["import { asc } from \"./asc\";\n\n/**\n * Returns a new array with `array[index]` replaced by `newValue` and the\n * result sorted ascending. Used by range-slider logic to normalize thumb\n * positions after a single-thumb move — crossing a neighbour reorders the\n * array so thumb-to-index mapping stays stable.\n */\nexport function replaceArrayItemAtIndex(\n\tarray: readonly number[],\n\tindex: number,\n\tnewValue: number,\n): number[] {\n\tconst output = array.slice();\n\toutput[index] = newValue;\n\treturn output.sort(asc);\n}\n"],"mappings":"AAAA,SAASA,GAAG,QAAQ,OAAO;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACtCC,KAAwB,EACxBC,KAAa,EACbC,QAAgB,EACL;EACX,MAAMC,MAAM,GAAGH,KAAK,CAACI,KAAK,CAAC,CAAC;EAC5BD,MAAM,CAACF,KAAK,CAAC,GAAGC,QAAQ;EACxB,OAAOC,MAAM,CAACE,IAAI,CAACP,GAAG,CAAC;AACxB","ignoreList":[]}