(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);var i,n,p,o,s,l,m,g,d,u,h,c,T,v,b,N,C=[],y={};i=a.getSpan().nextText(t.reference).nextAnyTag("td").tagContents(),m=a.getSpan().nextText(t.passenger).withEnd(a.getSpan().nextText(t.payment).getStart()).allInnerTagsFiltered("td3");for(var f=0;f<m.length;f+=2)m[f]&&m[f+1]&&(y[""+m[f]]={name:m[f],seats:{},seatingType:{},ticketNumber:m[f+1].innerCapture(/(\d+)/,1)});s=a.getSpan().allInnerTags("table3");for(var f=0;f<s.length;f++)if(s[f].innerTag("td3").innerText(t.flightNumber).exists()){var A=s[f].collapseToStart().withStart(s[f].previousTag("table3").getEnd()),x=RegExp("($<departureTime>d{2}:d{2})s+($<departureAirport>.*)s+(.*s+(($<departureCode>[A-Z]{3})))s+-s+($<arrivalTime>d{2}:d{2})($<arrivalAirport>.*?)s+(.*s+(($<arrivalCode>[A-Z]{3})))");if(m=A.innerCapture(x),m&&(h=a.getDetachedSpan(A.innerDate()+" "+m.$departureTime).innerDate(),c=m.$departureAirport,T=m.$departureCode,v=a.getDetachedSpan(A.innerDate()+" "+m.$arrivalTime).innerDate(),b=m.$arrivalAirport,N=m.$arrivalCode),g=s[f].innerText(t.flightNumber).nextAnyTag("td").tagContents().innerCapture(/($<code>\D+)($<flightNumber>\d+)/),u=g?g.$code:null,l=g?g.$flightNumber:null,d=s[f].innerText(t.operated).nextAnyTag("td").tagContents(),o=s[f].innerText(t.class).nextAnyTag("td").tagContents(),valid(l,o))for(var p=Object.keys(y),$=0;$<p.length;$++)y[p[$]].seatingType[""+l]=o;ASSERT(u,l,T,h,N,v)&&C.push({airlineName:d,airlineCode:u,flightNumber:l,departureCode:T,departureAirport:c,departureTime:h,arrivalCode:N,arrivalAirport:b,arrivalTime:v,passengers:y}),d=u=l=T=c=h=N=b=v=null}for(var S=[],f=0;f<C.length;f++)for(var k=C[f],D=Object.keys(k.passengers),F=0;F<D.length;F++){var z=k.passengers[D[F]],E={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:k.airlineName,airlineCode:k.airlineCode,flightNumber:k.flightNumber,departureAirportFuzzy:k.departureAirport,departureAirportCode:k.departureCode,departureTime:k.departureTime,arrivalAirportFuzzy:k.arrivalAirport,arrivalAirportCode:k.arrivalCode,arrivalTime:k.arrivalTime},underName:{"@type":"http://schema.org/Person",name:z.name,email:z.email},checkinUrl:n,reservationId:i,reservationStatus:"http://schema.org/ReservationConfirmed",totalPrice:z.totalPrice,priceCurrency:z.priceCurrency,reservedTicket:{"@type":"http://schema.org/Ticket",ticketNumber:z.ticketNumber,ticketedSeat:{"@type":"http://schema.org/Seat",seatNumber:z.seats[k.flightNumber],seatingType:z.seatingType[k.flightNumber]}}};valid(z.membershipNumber,z.programName)&&(E.programMembershipUsed={"@type":"http://schema.org/ProgramMembership",membershipNumber:z.membershipNumber,programName:z.programName}),S.push(E)}return S.length?S:CONTINUE}}).call();