//#region libs/shared/common/src/functions/utils/trimFieldValues.ts
var e = [
	{
		value: 1e9,
		unit: "b"
	},
	{
		value: 1e6,
		unit: "m"
	},
	{
		value: 1e3,
		unit: "k"
	}
], t = (t, n = e, r = !0) => {
	n.sort((e, t) => t.value - e.value);
	let i = r ? "$" : "";
	if (t < n[n.length - 1].value) return `$${t.toFixed(2)}`;
	for (let e of n) if (t >= e.value) return `${i}${(Math.round(100 * t / e.value) / 100).toFixed(2) + e.unit}`;
	return `${i}${t}`;
};
//#endregion
export { t as trimFieldValues };
