(function(){return function(e,t,r){function a(e){return(""+e.tagContents().trim()).length>0}var n=Scanner.fromMessage(e);n.setLocale(t);for(var i,p,g,s,l=n.getSpan().nextText(r.reservationIdPrefix).parentTag("td3").innerCapture(RegExp(regExpEscape(r.reservationIdPrefix)+"(.+)"),1).trim(),o=n.getSpan().nextText(r.reservationIdPrefix).nextTag("table3").allInnerTags("table4"),m=[],h=0;h<o.length;h++){s=o[h];var d=s.allInnerTags("td4").filter(a),u=d[1].innerDate(),v=d[3].innerDate(),c=combineDateAndTime(u,v),T=n.getSpan().withInterval(v.parentTag("td4").tagContents().getStart(),v.getStart()).trim(),f=d[5].innerDate(),x=combineDateAndTime(u,f),S=n.getSpan().withInterval(f.parentTag("td4").tagContents().getStart(),f.getStart()).trim(),b=d[6].innerCapture(/(?:\n|\s)($<name>.*?)\s+\(($<code>\w+)\s*($<number>\d+)\)/);b&&(i=b.$name,p=b.$code,g=b.$number),ASSERT(i,p,g,c,T,x,S)&&m.push({departureDateTime:c,departureAirport:T,arrivalDateTime:x,arrivalAirport:S,airlineName:i,airlineCode:p,flightNumber:g})}var C,N=[];if(r.passengerName){C=n.getSpan().next(r.passengerHeader).next(r.passengerName);do{N.push(""+C.innerCapture(r.passengerName,1)),C=C.next(r.passengerName)}while(0!==(""+C).length)}else{C=n.getSpan().nextText(r.passengerHeader).parentTag("table3").allInnerTags("tr3"),C.splice(0,1);for(var I=0;I<C.length;I++){var A=C[I].allInnerTags("td3");if(0===A.filter(a).length)break;N.push(A[0].tagContents())}}for(var D,y,z,F=[],h=0;h<m.length;h++){y=m[h];for(var I=0;I<N.length;I++)z=N[I],D={"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:y.airlineName,airlineCode:y.airlineCode,flightNumber:y.flightNumber,departureAirportFuzzy:y.departureAirport,departureTime:y.departureDateTime,arrivalAirportFuzzy:y.arrivalAirport,arrivalTime:y.arrivalDateTime},underName:{"@type":"http://schema.org/Person",name:z},reservationId:l,reservationStatus:"http://schema.org/ReservationConfirmed",reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat"}}},F.push(D)}if(F.length)return F}}).call();