This is an OOCL booking confirmation (titled 'Booking Acknowledgement').

transportLegs rules:
- One leg per OCEAN segment, in chronological order. 'FINAL DESTINATION' is post-ocean inland delivery (often the same city as 'PORT OF DISCHARGE'; sometimes inland onward) and must NEVER be a transport leg.
- Multi-leg trigger: 'TRANSSHIPMENT PORT' is populated with a port distinct from 'PORT OF DISCHARGE' -> 2 legs. A second 'TRANSSHIPMENT PORT' (or any 'T/S2' / second transhipment row) -> 3 legs.
- Single-leg shape: when no 'TRANSSHIPMENT PORT' row is printed, emit exactly 1 leg with portOfLoading='PORT OF LOADING' and portOfDischarge='PORT OF DISCHARGE' — even if 'FINAL DESTINATION' differs.
- Connectivity: leg N's portOfDischarge MUST equal leg N+1's portOfLoading. The final leg's portOfDischarge MUST equal the document's 'PORT OF DISCHARGE' (NOT 'FINAL DESTINATION').
- Per-leg ETD/ETA mapping:
  - Leg 1: vesselName/voyage from 'INTENDED VESSEL/VOYAGE'; etd = ETD next to 'INTENDED VESSEL/VOYAGE'; eta = ETA next to 'TRANSSHIPMENT PORT' if multi-leg, else ETA next to 'PORT OF DISCHARGE'.
  - Leg 2 (only if transhipment exists): vesselName/voyage from 'T/S INTENDED VESSEL/VOYAGE'; etd = ETD next to 'T/S INTENDED VESSEL/VOYAGE'; eta = ETA next to 'PORT OF DISCHARGE' (final leg) or next to the second transhipment row if 3 legs.
- Ignore the 'ETA' printed next to 'PORT OF LOADING' (arrival of empty/feeder at POL), the 'ETA' printed next to 'INTENDED VESSEL/VOYAGE' or 'T/S INTENDED VESSEL/VOYAGE' (the vessel's call at the LOADING port, NOT the discharge port), the 'ETA' printed next to 'FINAL DESTINATION' (inland delivery), and 'ESTIMATED CARGO AVAILABILITY AT DESTINATION HUB' — none of these is a leg ETA.
- Time integrity ('no time travel'): each leg's eta must be >= its etd. If applying the rules above would produce eta < etd (e.g. only the vessel-row ETA is printed, which is arrival at POL not POD), the leg's eta is genuinely not printed — return null.
- serviceCode: the single 'SERVICE CODE' value applies to the whole booking. Duplicate the same value on every leg.
- Strip the ' / <terminal>' suffix from port values (e.g. 'Hamburg / TCT Tollerort Container Terminal' -> 'Hamburg').
- If a T/S vessel/voyage cell is blank but the leg is required to reach the final POD, still emit the leg with vesselName/voyage null (serviceCode still duplicated).

containers rules:
- The 'CONTAINER QTY / SIZE / TYPE' (or 'TOTAL BOOKING CONTAINER QTY SIZE/TYPE') row in ROUTE INFORMATION gives the total quantity. The number of container entries you emit MUST equal that total.
- Single-depot case: the doc has ONE 'EMPTY PICK UP LOCATION' block. Repeat the entry N times, all sharing that depot (its first line).
- Multi-depot case: the doc has MULTIPLE per-block 'BOOKING QTY SIZE/TYPE' rows under CARGO & TRUCKING INFORMATION, each paired with its own 'EMPTY PICK UP LOCATION' block (e.g. ROUTE INFO total '8 X 20GP' splits into '4 X 20GP' + depot A on one cargo block and '4 X 20GP' + depot B on another). Expand each block independently and tag each container with its own depot. Do NOT collapse to a single depot.
