(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var i,p,n,o,m,s,u,g,l,d,h,c,v,C,N,b,f,y=[],S=[];if(i=a.getSpan().innerCapture(t.name,1).trim(),h=a.getSpan().innerCapture(regExpFormatted(/\1\s+(.*)/,t.ticketNumber),1),N=a.getSpan().innerCapture(regExpFormatted(/\1\s+([A-Z\d]{5,})/,t.reservationId),1),not(i))return CONTINUE;S[""+i]={name:i,seats:{},seatingType:{},ticketNumber:h,totalPrice:c,priceCurrency:v},b=a.getSpan().allInnerCapture(t.flightInfo);for(var T=0;T<b.length;T++){if(f=b[T],1===b.length){var A=/(\w{3})\s(\w{3})$/.exec(e.subject);u=A[1],d=A[2]}m=a.getDetachedSpan(f.$departureDate+" "+f.$departureHour+":"+f.$departureMinute).innerDate(),g=a.getDetachedSpan(f.$arrivalDate+" "+f.$arrivalHour+":"+f.$arrivalMinute).innerDate(),o=f.$airlineCode,p=f.$flightNumber,s=f.$departureAirport,l=f.$arrivalAirport,n=a.getSpan().innerCapture(regExpFormatted(/\1\s+(.*)/,t.price),1),c=n.innerCapture(/([\d,.]+)/,1),v=n.innerCapture(/([^\d,.]+)/,1).trim(),ASSERT(o,p,s,m,l,g)&&y.push({reservationId:N,airlineCode:o,flightNumber:p,departureAirport:s,departureCode:u,arrivalCode:d,departureTime:m,arrivalAirport:l,arrivalTime:g,passengers:S})}var $=[];for(T=0;T<y.length;T++)for(var F=y[T],k=Object.keys(F.passengers),I=0;I<k.length;I++){var z=F.passengers[k[I]],D={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:F.airlineName,airlineCode:F.airlineCode,flightNumber:F.flightNumber,departureAirportFuzzy:F.departureAirport,departureAirportCode:F.departureCode,departureTime:F.departureTime,arrivalAirportFuzzy:F.arrivalAirport,arrivalAirportCode:F.arrivalCode,arrivalTime:F.arrivalTime},underName:{"@type":"http://schema.org/Person",name:z.name},checkinUrl:C,reservationId:F.reservationId,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:c,priceCurrency:v,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:h,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:z.seats[F.flightNumber],seatingType:z.seatingType[F.flightNumber]}}};valid(z.membershipNumber,z.programName)&&(D.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:z.membershipNumber,programName:z.programName}),$.push(D)}return $.length?$:void 0}}).call();