(function(){return function(e,t,r){var a=Scanner.fromMessage(e);a.setLocale(t);var n,i,g,o,s,p,m,l,u,c,d,h,C,T,b,N,v,x,f,y,S,$,k,z=[],A={};n=a.getSpan().nextText(r.confirmationCode).parentTag("table2").tagContents().innerCapture(r.confirmationCodeRegex,1);var F=a.getSpan().nextText(r.passengerInfo).parentTag("table2").nextTag("td2").nextTag("td2").nextTag("td2").nextTag("td2");o=F.nextTag("td2").tagContents(),S=F.nextTag("td2").nextTag("td2").tagContents(),d=F.nextTag("td2").nextTag("td2").nextTag("td2").tagContents().innerCapture(/($<programName>\D+)($<membershipNumber>\d+)/),k=d?d.$programName:null,$=d?d.$membershipNumber:null,c=a.getSpan().nextText(r.totalPrice).nextTag("td2").tagContents().innerCapture(/($<currency>\w+)\s($<totalPrice>.+)/),l=c?c.$totalPrice:null,u=c?c.$currency:null,A[g]={name:o,programName:k,membershipNumber:$,ticketNumber:S,seats:{},seatingType:{},totalPrice:l,priceCurrency:u},i=a.getSpan().nextText(r.checkinUrl).nextTag("td2").innerLink(),p=a.getSpan().nextText(r.itinerary).parentTag("table2").allInnerTags("td2");for(var P=8;P<p.length;P+=14){var s=""+p[P].tagContents();s=s.substring(0,2)+" "+s.substring(2,5);var D=p[P+7].tagContents();if(!(""+(b=getFuzzyDate(a.getDetachedSpan(s+" "+D).firstDate()))))return CONTINUE;if(s=""+p[P+4].tagContents(),s=s.substring(0,2)+" "+s.substring(2,5),D=p[P+11].tagContents(),!(""+(x=getFuzzyDate(a.getDetachedSpan(s+" "+D).firstDate()))))return CONTINUE;N=p[P+2].tagContents(),v=p[P+9].tagContents(),f=p[P+3].tagContents(),y=p[P+10].tagContents(),h=p[P+1].tagContents().innerCapture(/($<code>\w+)\s($<flightNumber>\d+)/),T=h?h.$code:null,m=h?h.$flightNumber:null,ASSERT(T,m,b,N,x,f)&&z.push({airlineCode:T,airlineName:C,flightNumber:m,departureAirport:N,departureCode:v,departureTime:b,arrivalAirport:f,arrivalCode:y,arrivalTime:x,passengers:A})}for(var I=[],P=0;P<z.length;P++)for(var U=z[P],R=Object.keys(U.passengers),E=0;E<R.length;E++){var F=U.passengers[R[E]],M={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:U.airlineName,airlineCode:U.airlineCode,flightNumber:U.flightNumber,departureAirportFuzzy:U.departureAirport,departureAirportCode:U.departureCode,departureTime:U.departureTime,arrivalAirportFuzzy:U.arrivalAirport,arrivalAirportCode:U.arrivalCode,arrivalTime:U.arrivalTime},underName:{"@type":"http://schema.org/Person",name:F.name,email:F.email},checkinUrl:i,reservationId:n,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:F.totalPrice,priceCurrency:F.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:F.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:F.seats[U.flightNumber],seatingType:F.seatingType[U.flightNumber]}}};valid(F.membershipNumber,F.programName)&&(M.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:F.membershipNumber,programName:F.programName}),I.push(M)}if(I.length)return I}}).call();