(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var i,n,p,m,l,o,u,s,h,g,d,c,v,N=[],x={};u=a.getSpan(),n=u.next(t.reservationId).innerCapture(t.reservationId,1);var y;do{if(y?y=y.next(t.name):(y=u.next(t.name),0===(""+y).length&&(y=u.next(t.name_alt))),m=y.innerCapture(t.name,1),0===(""+m).length&&(m=y.innerCapture(t.name_alt,1).trim()),i=y.innerCapture(t.ticket,1).trim(),not(m))return CONTINUE;x[""+m]={name:m,seats:{},seatingType:{},ticketNumber:i,totalPrice:null,priceCurrency:null}}while(0!==(""+y.next(t.name)).length);var C;do{C=C?C.next(t.flightSummary):u.next(t.flightSummary),l=C.innerCapture(t.flightSummary),g=C.next(t.departure).nextDate(),(""+g).match(/\-/)&&(g=u.getScanner().getDetachedSpan((""+C.next(t.departure).nextRegExp(/\d.*/)).replace("-"," ")).innerDate()),c=C.next(t.arrival).nextDate(),(""+c).match(/\-/)&&(c=u.getScanner().getDetachedSpan((""+C.next(t.arrival).nextRegExp(/\d.*/)).replace("-"," ")).innerDate()),d=C.next(t.departure).innerCapture(t.departure).$airportAddress,v=C.next(t.arrival).innerCapture(t.arrival).$airportAddress,h=l.$airlineCode,s=l.$airlineName,o=l.$flightNumber,ASSERT(h,o,d,g,v,c)&&N.push({reservationId:n,airlineName:s,airlineCode:h,flightNumber:o,departureAirport:d,departureTime:g,arrivalAirport:v,arrivalTime:c,passengers:x})}while(0!==(""+C.next(t.flightSummary)).length);for(var b=[],f=0;f<N.length;f++)for(var S=N[f],T=Object.keys(S.passengers),A=0;A<T.length;A++){var k=S.passengers[T[A]],z={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:S.airlineName,airlineCode:S.airlineCode,flightNumber:S.flightNumber,departureAirportFuzzy:S.departureAirport,departureAirportCode:S.departureCode,departureTime:S.departureTime,arrivalAirportFuzzy:S.arrivalAirport,arrivalAirportCode:S.arrivalCode,arrivalTime:S.arrivalTime},underName:{"@type":"http://schema.org/Person",name:k.name},checkinUrl:p,reservationId:S.reservationId,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:null,priceCurrency:null,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:i,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:k.seats[S.flightNumber],seatingType:k.seatingType[S.flightNumber]}}};valid(k.membershipNumber,k.programName)&&(z.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:k.membershipNumber,programName:k.programName}),b.push(z)}if(b.length)return b}}).call();