"""parse_duration: the function to implement. Test file for AI Compare (What the tech).

SPECIFICATION

parse_duration(text) turns a duration written like "1h30m" into a number of seconds.

1. The text is made of one to three parts. Each part is a whole number (digits 0-9 only)
   followed by a unit: h (hours), m (minutes) or s (seconds).
2. Units are case-insensitive ("1H" is one hour). Spaces are allowed before, after and
   between parts ("1h 30m"), but not inside a part ("1 h" is invalid).
3. Each unit may appear at most once, and parts must be in the order h, m, s.
4. Minutes and seconds may be larger than 59 ("90m" is 5400 seconds).
5. The result is an int. The total must not exceed 86400 (24 hours); "24h" is allowed.
6. Anything else raises ValueError: an empty or blank string, a number without a unit,
   a unit without a number, an unknown unit, a repeated unit, the wrong order,
   a sign or a decimal point, or a total over 86400.

Examples:
    parse_duration("45s")        -> 45
    parse_duration("1h30m")      -> 5400
    parse_duration(" 2H 5m 10S ") -> 7510
"""


def parse_duration(text: str) -> int:
    raise NotImplementedError
