Country Repository
Caches the result of a CountryDataSource and applies the caller's allow/exclude rules.
The cache exists so reopening the sheet, rotating the device, or retrying after an error does not re-hit a remote source. Concurrent countries calls are collapsed by a Mutex, so two selectors opening at once trigger one load, not two.
The cache is keyed by the platform's default Locale. The bundled source returns country names in the device's language, so a cache that ignored the locale would keep serving French names after the user switched to Arabic — for the whole process lifetime, since Default is a singleton. A locale change is rare and a reload is cheap, so the check is simply made on every call.
This class holds no UI state and is safe to keep in a singleton, a DI graph, or a remember.
Functions
Drops the cache so the next countries call reloads. Used by the sheet's Retry action.