(function(){return function(e,r,t){var a=Scanner.fromMessage(e);a.setLocale(r);for(var n,i=a.getSpan().nextText(t.passengerNamePrefix).parentTag("table3").allInnerTags("tr3").filter(function(e){return e.tagContents().getLength()}),p=[],o=0;o<i.length;o++){i[o];for(var g=a.getSpan().nextText(t.passengerNamePrefix).parentAnyTag("td").tagContents().innerCapture(regExpFormatted(/\1:([A-Za-z0-9\n\s'\-\.]+)/,t.passengerNamePrefix),1).trim(),l=g.split("\n"),s=0;s<l.length;s++)n=l[s].trim(),p.push(n)}for(var d=[],m=a.getSpan().nextText(t.flightDetailsHeader).nextText(t.reservationIdPrefix).parentTag("td2").tagContents().innerCapture(RegExp(regExpEscape(t.reservationIdPrefix)+": (\\w{6})"),1),u=a.getSpan().nextText(t.passengerNamePrefix).nextTag("table3");u.allInnerTagsFiltered("td3")[0]&&(""+u.allInnerTags("td3")[0]).match(t.flightCheck);){var h=u,x=h.firstTag("tr3").innerDate(),T=x.nextTag("tr3").nextTag("td3").nextTag("td3"),f=combineDateAndTime(x,T.innerDate()),v=T.innerCapture(/([A-Za-z0-9\s]+?)\([A-Z]{3}\)/,1).trim(),C=T.innerCapture(/\((\w{3})\)/,1),c=T.nextTag("tr3").nextTag("td3").nextTag("td3"),A=combineDateAndTime(x,c.innerDate());Date.parse(f)>Date.parse(A)&&(A=modifyDate(A,1));var N=c.innerCapture(/([A-Za-z0-9\s]+?)\([A-Z]{3}\)/,1).trim(),D=c.innerCapture(/\((\w{3})\)/,1),b=c.nextTag("table4").nextTag("td4").nextTag("td4").tagContents().innerCapture(/($<airlineName>.+)\(($<airlineCode>\w{2})\s+($<flightNumber>\d+)\)/),y=b.$airlineName.trim(),S=b.$airlineCode,z=b.$flightNumber;ASSERT(v,N,f,A)&&d.push({departureDate:f,arrivalDate:A,departureAirport:v,arrivalAirport:N,departureAirportCode:C,arrivalAirportCode:D,airlineName:y,airlineCode:S,flightNumber:z}),u=z.nextTag("table3")}for(var F=[],o=0;o<d.length;o++)for(var P=d[o],s=0;s<p.length;s++)F.push({"@context":"http://schema.org","@type":"http://schema.org/FlightReservation",reservationFor:{"@type":"http://apple.com/FuzzyFlight",airlineName:P.airlineName,airlineCode:P.airlineCode,flightNumber:P.flightNumber,departureAirportFuzzy:P.departureAirport,departureTime:P.departureDate,departureAirportCode:P.departureAirportCode,arrivalAirportFuzzy:P.arrivalAirport,arrivalTime:P.arrivalDate,arrivalAirportCode:P.arrivalAirportCode},underName:{"@type":"http://schema.org/Person",name:p[s]},reservationId:m,reservationStatus:"http://schema.org/ReservationConfirmed",reservedTicket:{"@type":"http://schema.org/Ticket",ticketedSeat:{"@type":"http://schema.org/Seat"}}});if(F.length)return F}}).call();