(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var i,n=a.getSpan(),p=t.isCancellation?"Cancelled":"Confirmed",o=[],s=[],u=[];i=n.nextTagContents(t.reservationIdPrefix),n.next(t.passengerListPrefix).parentAnyTag("td").tagContents().split(/\n/).slice(1).forEach(function(e){var r=e.innerCapture(/(.+)\s?:\s?(\d+)/);o.push({name:r[1],ticketNumber:r[2]})}),0===o.length&&o.push({});for(var l=n.nextTag("table9");!l.isNullSpan_;){var d,g,m,h,c,C,A,f,v,T,x,N;c=l.nextTagContents(t.flightNumberPrefix),g=l.next(t.flightNumberPrefix).parentAnyTag("td").tagContents().innerCapture(/([0-9A-Z]{2})\s?(\d{1,4})/)[2],d=l.next(t.flightNumberPrefix).parentAnyTag("td").tagContents().innerCapture(/([0-9A-Z]{2})\s?(\d{1,4})/)[1],m=l.nextTagContents(t.departureAirportPrefix).split(/\n/)[0],C=l.nextTagContents(t.departureAirportPrefix).split(/\n/)[1],h=m.innerCapture(/([A-Z]{3})\s(.+)/)[1],m=m.innerCapture(/([A-Z]{3})\s(.+)/)[2],f=l.nextTagContents(t.arrivalAirportPrefix).split(/\n/)[0],x=l.nextTagContents(t.arrivalAirportPrefix).split(/\n/)[1],v=f.innerCapture(/([A-Z]{3})\s(.+)/)[1],f=f.innerCapture(/([A-Z]{3})\s(.+)/)[2],A=a.getDetachedSpan(c+" "+C).innerDate(),N=a.getDetachedSpan(T+" "+x).innerDate(),ASSERT(m,h,f,v)&&s.push({airlineCode:d,flightNumber:g,departureAirport:m.trim(),departureAirportCode:h,departureDateTime:A,arrivalAirport:f.trim(),arrivalAirportCode:v,arrivalDateTime:N}),l=l.nextTag("table9")}return s.forEach(function(e){o.forEach(function(r){ASSERT(e.airlineCode,e.flightNumber,e.departureAirport,e.departureDateTime),u.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineCode:e.airlineCode,airlineName:e.airlineName,flightNumber:e.flightNumber,departureAirportFuzzy:e.departureAirport,departureAirportCode:e.departureAirportCode,departureTime:e.departureDateTime,arrivalAirportFuzzy:e.arrivalAirport,arrivalAirportCode:e.arrivalAirportCode,arrivalTime:e.arrivalDateTime},underName:{"@type":"http://schema.org/Person",name:r.name},reservationId:i,reservationStatus:"http://schema.org/Reservation"+p,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:r.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:r.seat,seatingType:null}}})})}),u}}).call();