// The capture surface's text rules — pure, no view layer.//// ONE DELIBERATE DIFFERENCE FROM THE TYPESCRIPT, written down because a// silent one is a bug somebody re-introduces://// • `formatClock` takes INTEGER milliseconds. The phone's `number` admits// `NaN` and a fractional millisecond, and `Int(Double.nan)` does not print// "NaN" in Swift — it traps. A recording timer holds whole milliseconds, so// the type says so and the trap cannot be reached.importCottonKitimportFoundationpublicenumCaptureText {/// `m:ss` for the recording timer and the voice-note pill. Never negative:/// a clock that has not started reads `0:00`, not `-1:00`.publicstaticfunc formatClock(millis: Int) -> String {let totalSeconds = max(0, millis / 1000)let minutes = totalSeconds / 60let seconds = totalSeconds % 60returnString(format: "%d:%02d", minutes, seconds) }}