ó
    W6¯j‘
  ã                   óP   • S r SSKr\R                  " S5      rSu  rrS rS rS rg)aÚ  What counts as a registration.

Two different jobs, deliberately kept apart:

`is_plate` checks a value from a field that IS the plate (Motorway's own
prettyVrm or sellingVrm, a column in a table). It is wide on purpose.
Northern Ireland plates (JXZ 8899), the pre 2001 prefix and suffix
styles, and private plates of every shape are all real registrations, and
a modern-only pattern threw every one of them away: found live
2026-09-10, a Kia c'eed on JXZ 8899 sitting on the board reading NO
PLATE, its plate captured but refused. Anything alphanumeric of a
plausible length with at least one letter and one digit is accepted.

`candidates` is the third job, added 2026-09-20: one car can genuinely
have two real plates, the one a platform lists it under and the one it
sells with, and anything looking a car up by plate has to try both.

`PLATE_IN_TEXT` hunts for a plate inside prose, where being wide would
match half the words on a page. It stays anchored to the shapes that
cannot be mistaken for ordinary text: the modern AB12 CDE, the prefix
A123 BCD and the suffix ABC 123D. A bare "ABC 1234" is a real Northern
Ireland plate but also "GTI 2000", so it is never picked out of prose,
only accepted from a field that promises a plate.
é    NzP\b(?:[A-Z]{2}\d{2}\s?[A-Z]{3}|[A-Z]\d{1,3}\s?[A-Z]{3}|[A-Z]{3}\s?\d{1,3}[A-Z])\b)é   é   c                 ó€   • SR                  [        U =(       d    S5      R                  5       R                  5       5      $ )z:One plate, upper case with the spaces out. "" for nothing.Ú )ÚjoinÚstrÚupperÚsplit)Úvalues    Ú0/Users/stevendouglas/BidBrain/bidbrain/plates.pyÚtidyr   $   s,   € à�7‰7”3�u—{ Ó#×)Ñ)Ó+×1Ñ1Ó3Ó4Ð4ó    c                 ó  • [        U 5      n[        [        U5      s=::  a
  [        ::  a-  O  gUR	                  5       (       a  UR                  5       (       d  g[        S U 5       5      =(       a    [        S U 5       5      $ )zZWhether a value from a field that should hold a registration looks
like one. Pure, tested.Fc              3   ó@   #   • U  H  oR                  5       v •  M     g 7f©N)Úisalpha©Ú.0Úcs     r   Ú	<genexpr>Úis_plate.<locals>.<genexpr>/   s   é € Ð&¢A˜q�y‰y�{ˆ{¢Aùó   ‚c              3   ó@   #   • U  H  oR                  5       v •  M     g 7fr   )Úisdigitr   s     r   r   r   /   s   é € Ð.FÂA¸q¯y©y¯{¨{ÂAùr   )r   ÚMIN_LENÚlenÚMAX_LENÚisasciiÚisalnumÚany)r   Úts     r   Úis_plater"   )   s\   € ô 	ˆU‹€AÜ”s˜1“vÕ(¤Õ(Øð 23·±·±ÀAÇIÁIÇKÁKØÜÑ&¡AÓ&Ó&×F¬3Ñ.FÁAÓ.FÓ+FÐFr   c                  óª   • / nU  HA  n[        U5      nU(       d  M  [        U5      (       d  M)  X1;  d  M0  UR                  U5        MC     [        U5      $ )a  Every plate one car might be known by, tidied, in the order given,
each one only once. Built for the DealerKit lookups (2026-09-20): a
car whose seller kept a private plate is listed on the platform under
that plate but sells, and so lands on DealerKit, under the plate
underneath (Motorway's own sellingVrm, Carwow's plate transfer field),
and looking for one plate exactly made those cars read as missing on
DealerKit forever. Anything blank, or not plate shaped, is dropped, so
a bad read can never widen a search.)r   r"   ÚappendÚtuple)ÚvaluesÚoutÚvr!   s       r   Ú
candidatesr)   2   sD   € ð €CÛˆÜ�‹Gˆßˆ1”˜!—“ ¥Ø�J‰J�qŽMñ ô �‹:Ðr   )	Ú__doc__ÚreÚcompileÚPLATE_IN_TEXTr   r   r   r"   r)   © r   r   Ú<module>r/      s>   ðñó0 
à—
’
ð#ó€ð Ñ €ˆò5ò
Gór   