{"version":3,"file":"format-tokens.d.ts","sourceRoot":"","sources":["../../src/core/format-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMlD","sourcesContent":["/**\n * Compact token/count formatting shared by the surfaces that report numbers\n * (footer, task panel, startup resource summary).\n *\n * Numbers stay exact where they fit and degrade to one decimal of `k`/`M` so a\n * count never grows the fixed-width chrome it sits in.\n */\nexport function formatTokens(count: number): string {\n\tif (count < 1000) return count.toString();\n\tif (count < 10000) return `${(count / 1000).toFixed(1)}k`;\n\tif (count < 1000000) return `${Math.round(count / 1000)}k`;\n\tif (count < 10000000) return `${(count / 1000000).toFixed(1)}M`;\n\treturn `${Math.round(count / 1000000)}M`;\n}\n"]}